home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 93 / CDMM_93_2.ISO / Project Nomads / nomads_demo_eng.exe / ISLANDDRIVE.TCL < prev    next >
Encoding:
Text File  |  2002-04-19  |  3.9 KB  |  154 lines

  1. #
  2. #   Zustands-▄berwachungs-Script
  3. #   State Watch Script
  4. #
  5. #   IslandDrive
  6. #
  7. #   created:    15-Jun-2000 Bernd
  8. #   
  9. #   (C) COPYRIGHT 2000 RADONLABS GMBH
  10. #
  11.  
  12.  
  13. # --------------------------------------------------------
  14. #         F U N K T I O N S L O S E S   H A U S
  15. # --------------------------------------------------------
  16. proc islanddrivewatch_normal {} {
  17.  
  18.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  19.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  20.     if {[.getartefactmode] == "false"} {
  21.         .announcestate house
  22.     } elseif {[.iscollected] == "true"} {
  23.         .announcestate backpack
  24.     } elseif {[.getcharges] <= 0} {
  25.         .setremoveable true
  26.     } elseif {[.getcreator] != "null"} {
  27.         .announcestate infactoryslot
  28.     }
  29. }
  30.  
  31. proc islanddrivewatch_infactoryslot {} {
  32.  
  33.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  34.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  35.     if {[.getartefactmode] == "false"} {
  36.         .announcestate house
  37.     } elseif {[.iscollected] == "true"} {
  38.         .announcestate backpack
  39.     } elseif {[.getcharges] <= 0} {
  40.         .setremoveable true
  41.     } elseif {[.getcreator] == "null"} {
  42.         .announcestate normal
  43.     }
  44. }
  45.  
  46. proc islanddrivewatch_house {} {
  47.  
  48.     set station [.getparentvehicle]
  49.     # kann zerstoert oder wieder zusammengeklappt werden
  50.     if {[.iskilled] == "true"} {
  51.         .announcestate explode
  52.     } elseif {[.getartefactmode] == "true"} {
  53.         .announcestate normal
  54.     } elseif {[$station.isislanddriveworking] == "true"} {
  55.         .announcestate working
  56.     } elseif {[.removebuilding] == "true"} {
  57.         .announcestate remove
  58.     }
  59. }
  60.  
  61. proc islanddrivewatch_working {} {
  62.  
  63.     set station [.getparentvehicle]
  64.     # kann zerstoert oder wieder zusammengeklappt werden
  65.     if {[.iskilled] == "true"} {
  66.         .announcestate explode
  67.     } elseif {[.getartefactmode] == "true"} {
  68.         .announcestate normal
  69.     } elseif {[$station.isislanddriveworking] == "false"} {
  70.         .announcestate house
  71.     } elseif {[.removebuilding] == "true"} {
  72.         .announcestate remove
  73.     }
  74. }
  75.  
  76.  
  77. proc islanddrivewatch_bauphase {} {
  78.  
  79.     # kann zerstoert oder wieder zusammengeklappt werden
  80.     if {[.iskilled] == "true"} {
  81.         .announcestate explode
  82.     } elseif {[.getartefactmode] == "true"} {
  83.         .announcestate normal
  84.     } elseif {[.isstatetimeover] == "true"} {
  85.         .announcestate house
  86.         usersymbolicname playernavtower
  87.     }
  88. }
  89.  
  90. proc islanddrivewatch_explode {} {
  91.  
  92.     # kein Uebergang zum Artefakt.
  93.     if {[.isanimfinished] == "true"} {
  94.         if {[.getcharges] <= 0.0} {
  95.             .setremoveable true
  96.         } else {
  97.             .announcestate normal
  98.         .removefromisland
  99.         }
  100.     }
  101. }
  102.  
  103. proc islanddrivewatch_remove {} {
  104.  
  105.     # kein Uebergang zum Artefakt.
  106.     if {[.isanimfinished] == "true"} {
  107.         if {[.getcharges] <= 0.0} {
  108.             .setremoveable true
  109.         } else {
  110.             .announcestate normal
  111.         .removefromisland
  112.         }
  113.     }
  114. }
  115.  
  116. proc islanddrivewatch_backpack {} {
  117.  
  118.     # Moeglich: usgeworfen (Nicht mehr "gesammelt") oder im
  119.     # Menue gezeigt (sichtbar)
  120.     if {[.iscollected] == "false"} {
  121.         .announcestate normal
  122.     } elseif {[.isvisible] == "true"} {
  123.         .announcestate menue
  124.     }
  125. }
  126.  
  127. proc islanddrivewatch_menu {} {
  128.  
  129.     if {[.isvisible] == "false"} {
  130.         .announcestate backpack
  131.     } elseif {[.getartefactuse] == "true"} {
  132.         .announcestate build
  133.     } elseif {[.iscollected] == "false"} {
  134.         .announcestate normal
  135.     }
  136. }
  137.  
  138. proc islanddrivewatch_build {} {
  139.  
  140.     if {[.iskilled] == "true"} {
  141.         .announcestate explode
  142.     } elseif {[.getartefactmode] == "false"} {
  143.         .announcestate bauphase
  144.     } elseif {[.getartefactuse] == "false"} {
  145.         .announcestate backpack
  146.     }
  147. }
  148.  
  149. proc islanddrivewatch_cinematic {} {
  150.  
  151.     # empty
  152. }    
  153.  
  154.